<h1>Listando entradas</h1>

<table>
  <tr>
  <% for column in Entrada.content_columns %>
    <th><%= column.human_name %></th>
  <% end %>
  </tr>
  
<% for entrada in @entradas %>
  <tr>
  <% for column in Entrada.content_columns %>
    <td><%=h entrada.send(column.name) %></td>
  <% end %>
    <td><%= link_to 'Ver', :action => 'ver', :id => entrada %></td>
    <td><%= link_to 'Editar', :action => 'editar', :id => entrada %></td>
    <td><%= link_to 'Borrar', { :action => 'destruir', :id => entrada }, :confirm => '¿Seguro?', :method => :post %></td>
  </tr>
<% end %>
</table>

<%= link_to 'Ant<<', { :page => @entrada_pages.current.previous } if @entrada_pages.current.previous %>
<%= link_to '>>Sig', { :page => @entrada_pages.current.next } if @entrada_pages.current.next %> 

<br />

<%= link_to '*Nueva*', :action => 'nueva' %>
